cmake_minimum_required(VERSION 2.8.2)

project(RTXRTOS-download NONE)

include(ExternalProject)

# download RTX RTOS source from official ARM GitHub repo
    ExternalProject_Add( 
        RTXRTOS
        PREFIX RTXRTOS
        SOURCE_DIR ${CMAKE_BINARY_DIR}/RTXRTOS_Source
        GIT_REPOSITORY  https://github.com/ARM-software/CMSIS_5
        GIT_TAG master  # target master branch
        GIT_SHALLOW 1   # download only the tip of the branch, not the complete history
        TIMEOUT 10
        LOG_DOWNLOAD 1
        
        # Disable all other steps
        CONFIGURE_COMMAND ""
        BUILD_COMMAND ""
        INSTALL_COMMAND ""
    )
